//index.js
//获取应用实例
import {typeWord, fetch} from '../../utils/index.js';
var app = getApp();
let timer;
Page({
    data: {
        list: []
    },
    onLoad: function() {
        this.getStoreList(true);
    },
    showHello: function() {},
    getStoreList: function(refresh) {
        fetch.post('/store/list', {}).then((res) => {
            this.setData({list: res.list});
        });
    },
    goStore: function(event) {
        // wx.navigateTo({
        //   url:'/pages/store/index?id='+event.currentTarget.dataset.store_id
        // })
        const mobile = event.currentTarget.dataset.mobile;
        if (mobile) {
            wx.makePhoneCall({phoneNumber: mobile});
        }
    }
})
